package com.goldcn.user.dao;

import com.goldcn.user.model.Role;
import com.goldcn.user.vo.RoleAndFuncDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Long roleID);

    int insert(Role record);

    int insertSelective(Role record);

    Role selectByPrimaryKey(Long roleID);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);

    Role selectByName(@Param(value = "roleName") String roleName, @Param(value = "companyID") Long companyID);

    List<RoleAndFuncDto> selectRoleList(Long companyID);

    RoleAndFuncDto selectRoleAndFuncByID(Long roleID);

    int insertBatch(List<Role> record);

    List<Role> selAdmin(@Param(value = "companyID") Long companyID, @Param(value = "code") Integer code);

}